/**
 * ReadTIFF.hpp
 *
 *  @date 14.12.2011
 *  @author Thomas Wiemann
 */

#ifndef READTIFF_HPP_
#define READTIFF_HPP_


#include <string>


#include <cstdint>

#ifndef __UINT32
typedef uint32_t uint32;
#endif
#ifndef __INT32
typedef int32_t int32;
#endif

#include <SDL.h>
#include <tiff.h>
#include <tiffio.h>

using std::string;

namespace asteroids
{

class ReadTIFF
{
public:

	/**
	 * @brief Reads the given file
	 */
    ReadTIFF(string filename);
    virtual ~ReadTIFF();

    /**
     * @brief Returns the width of the image
     */
    int width() {return m_width;}

    /**
     * @brief Returns the height of the image
     */
    int height() {return m_height;}

    /**
     * @brief Returns the pixel data
     */
    unsigned char* pixels() {return m_pixels;}

private:
    int m_width;
    int m_height;
    unsigned char* m_pixels;
};

}

#endif /* READTIFF_HPP_ */
